3.57 \(\int e^{x^2} \sin (b x) \, dx\)

Optimal. Leaf size=69 \[ \frac{1}{4} i \sqrt{\pi } e^{\frac{b^2}{4}} \text{Erfi}\left (\frac{1}{2} (2 x-i b)\right )-\frac{1}{4} i \sqrt{\pi } e^{\frac{b^2}{4}} \text{Erfi}\left (\frac{1}{2} (2 x+i b)\right ) \]

[Out]

(I/4)*E^(b^2/4)*Sqrt[Pi]*Erfi[((-I)*b + 2*x)/2] - (I/4)*E^(b^2/4)*Sqrt[Pi]*Erfi[(I*b + 2*x)/2]

________________________________________________________________________________________

Rubi [A]  time = 0.0526159, antiderivative size = 69, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 3, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.3, Rules used = {4472, 2234, 2204} \[ \frac{1}{4} i \sqrt{\pi } e^{\frac{b^2}{4}} \text{Erfi}\left (\frac{1}{2} (2 x-i b)\right )-\frac{1}{4} i \sqrt{\pi } e^{\frac{b^2}{4}} \text{Erfi}\left (\frac{1}{2} (2 x+i b)\right ) \]

Antiderivative was successfully verified.

[In]

Int[E^x^2*Sin[b*x],x]

[Out]

(I/4)*E^(b^2/4)*Sqrt[Pi]*Erfi[((-I)*b + 2*x)/2] - (I/4)*E^(b^2/4)*Sqrt[Pi]*Erfi[(I*b + 2*x)/2]

Rule 4472

Int[(F_)^(u_)*Sin[v_]^(n_.), x_Symbol] :> Int[ExpandTrigToExp[F^u, Sin[v]^n, x], x] /; FreeQ[F, x] && (LinearQ
[u, x] || PolyQ[u, x, 2]) && (LinearQ[v, x] || PolyQ[v, x, 2]) && IGtQ[n, 0]

Rule 2234

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[F^(a - b^2/(4*c)), Int[F^((b + 2*c*x)^2/(4*c))
, x], x] /; FreeQ[{F, a, b, c}, x]

Rule 2204

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erfi[(c + d*x)*Rt[b*Log[F], 2
]])/(2*d*Rt[b*Log[F], 2]), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rubi steps

\begin{align*} \int e^{x^2} \sin (b x) \, dx &=\int \left (\frac{1}{2} i e^{-i b x+x^2}-\frac{1}{2} i e^{i b x+x^2}\right ) \, dx\\ &=\frac{1}{2} i \int e^{-i b x+x^2} \, dx-\frac{1}{2} i \int e^{i b x+x^2} \, dx\\ &=\frac{1}{2} \left (i e^{\frac{b^2}{4}}\right ) \int e^{\frac{1}{4} (-i b+2 x)^2} \, dx-\frac{1}{2} \left (i e^{\frac{b^2}{4}}\right ) \int e^{\frac{1}{4} (i b+2 x)^2} \, dx\\ &=\frac{1}{4} i e^{\frac{b^2}{4}} \sqrt{\pi } \text{erfi}\left (\frac{1}{2} (-i b+2 x)\right )-\frac{1}{4} i e^{\frac{b^2}{4}} \sqrt{\pi } \text{erfi}\left (\frac{1}{2} (i b+2 x)\right )\\ \end{align*}

Mathematica [A]  time = 0.0266167, size = 43, normalized size = 0.62 \[ \frac{1}{4} \sqrt{\pi } e^{\frac{b^2}{4}} \left (\text{Erf}\left (\frac{b}{2}-i x\right )+\text{Erf}\left (\frac{b}{2}+i x\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[E^x^2*Sin[b*x],x]

[Out]

(E^(b^2/4)*Sqrt[Pi]*(Erf[b/2 - I*x] + Erf[b/2 + I*x]))/4

________________________________________________________________________________________

Maple [A]  time = 0.099, size = 42, normalized size = 0.6 \begin{align*}{\frac{\sqrt{\pi }}{4}{{\rm e}^{{\frac{{b}^{2}}{4}}}}{\it Erf} \left ( -ix+{\frac{b}{2}} \right ) }+{\frac{\sqrt{\pi }}{4}{{\rm e}^{{\frac{{b}^{2}}{4}}}}{\it Erf} \left ( ix+{\frac{b}{2}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(exp(x^2)*sin(b*x),x)

[Out]

1/4*Pi^(1/2)*exp(1/4*b^2)*erf(-I*x+1/2*b)+1/4*Pi^(1/2)*exp(1/4*b^2)*erf(I*x+1/2*b)

________________________________________________________________________________________

Maxima [A]  time = 1.17189, size = 50, normalized size = 0.72 \begin{align*} \frac{1}{4} \, \sqrt{\pi }{\left (\operatorname{erf}\left (\frac{1}{2} \, b + i \, x\right ) e^{\left (\frac{1}{4} \, b^{2}\right )} - \operatorname{erf}\left (-\frac{1}{2} \, b + i \, x\right ) e^{\left (\frac{1}{4} \, b^{2}\right )}\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(x^2)*sin(b*x),x, algorithm="maxima")

[Out]

1/4*sqrt(pi)*(erf(1/2*b + I*x)*e^(1/4*b^2) - erf(-1/2*b + I*x)*e^(1/4*b^2))

________________________________________________________________________________________

Fricas [A]  time = 0.462975, size = 88, normalized size = 1.28 \begin{align*} \frac{1}{4} \, \sqrt{\pi }{\left (\operatorname{erf}\left (\frac{1}{2} \, b + i \, x\right ) - \operatorname{erf}\left (-\frac{1}{2} \, b + i \, x\right )\right )} e^{\left (\frac{1}{4} \, b^{2}\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(x^2)*sin(b*x),x, algorithm="fricas")

[Out]

1/4*sqrt(pi)*(erf(1/2*b + I*x) - erf(-1/2*b + I*x))*e^(1/4*b^2)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int e^{x^{2}} \sin{\left (b x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(x**2)*sin(b*x),x)

[Out]

Integral(exp(x**2)*sin(b*x), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int e^{\left (x^{2}\right )} \sin \left (b x\right )\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(x^2)*sin(b*x),x, algorithm="giac")

[Out]

integrate(e^(x^2)*sin(b*x), x)